home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk102 / djclock / clockdj.doc < prev    next >
Text File  |  1995-03-19  |  35KB  |  1,330 lines

  1.  
  2. ClockDJ   - Assembly language clock, mouse, screen and window program.
  3. Version   - 4.10
  4. Copyright - Copyright (c) by David Jenkins, 7th January 1990, 
  5.             I can be reached at Bloom Beacon 416-283-5924,
  6.                         and CRS   416-629-0136.    
  7.  
  8.      This program is copyright but may be distributed freely. Please keep the
  9. documentation with the load module.
  10.  
  11.  
  12. Version 4.10
  13. ~~~~~~~~~~~~
  14.  
  15. 1. The key reading and parsing routines were re-vamped in
  16.    V4.09 with the result that any extra characters (including  blanks) 
  17.    at the end of a macro definition would cause the *next* definition
  18.    to be invalid. 
  19.  
  20.     Version 4.10 corrects this.
  21.  
  22.    This means that any characters following a macro definition will
  23.    be treated as a comment. Also any line that begins with an asterisk (*)
  24.    will be treated as a comment.
  25.  
  26.  
  27. 2. The ARexx macro which calls the Arp file requester (FILEREQUESTER)
  28.    had a bug which returned a directory when no directory or file
  29.    were selected. This is fixed.
  30.  
  31. 3. There are five new ARexx commands: SETARPDIR,  SETARPFILE, 
  32.    SETARPTITLE, SETARPCOLOUR and POPREQUESTER.
  33.  
  34.    SETARPDIR dirname 
  35.    
  36.   will set the initial directory string in the  Arp file requester
  37.   to dirname.
  38.  
  39.  
  40.    SETARPFILE filename 
  41.    
  42.   will set the initial file string in the  Arp file requester
  43.   to filename.
  44.  
  45.  
  46.    SETARPTITLE title 
  47.    
  48.   will set the title in the  Arp file requester.
  49.  
  50.  
  51.    SETARPCOLOUR number 
  52.    
  53.   will set the colour of the  Arp file requester. The number can
  54.   be 1 or 2.
  55.  
  56.  
  57.    POPREQUESTER text
  58.  
  59.   will put a requester displaying the text on the top screen with 
  60.   a YES/NO choice. The selection is passed back in RESULT as YES or NO.
  61.  
  62.  
  63. Version 4.09
  64. ~~~~~~~~~~~~
  65.  
  66.     There are a number of improvements in this version:
  67.  
  68. 1. The Pop to Front menu item now has a sub-item called "Cling". If
  69.    you select this, a message will appear asking you to click in a
  70.    window. When you do, the clock will attach itself to the selected
  71.    window; the clock menu will also become a part of this window. 
  72.    Note that only windows with no existing menus or UserPort
  73.    are eligible to be selected. In practise this confines you to CLI
  74.    windows. Once the clock is attached to a window, the "Cling" menu
  75.    item is highlighted; re-selecting "Cling" will move the clock to
  76.    its own window on the Workbench screen. If you close a window
  77.    the clock is attached to, it will re-open itself on the Workbench
  78.    screen. 
  79.  
  80.     If "Save" is selected when the clock is attached to a window,
  81.    the window title will be saved in the clockdj.config file. When
  82.    the clock is started, it will look for a window with this title and
  83.    attach itself to the window.
  84.  
  85.  
  86. 2. The macro definitions will allow &arf1 and &arf2 to be defined
  87.    as symbolic variables anywhere in the string fields of a macro.
  88.    This will cause the Arp file requester to be called when the
  89.    macro is invoked; the selected file name (and path) will be
  90.    substituted for the variable. Any number of &arf1 (or &arf2)
  91.    variables can be included in the string. The variable can be 
  92.    specified in either command or string macros (command macros
  93.    have a "c" at the end, string macros have an "s" at the end).
  94.  
  95.     For example:
  96.  
  97.     \ral\t\type &arf2\r\c
  98.  
  99.    When RightAlt + t are pressed, submit a "type filename" command 
  100.    where "filename" is selected from the Arp file requester.
  101.     
  102.  
  103.     \ral\d\delete &arf2\r\c
  104.  
  105.    When RightAlt + d are pressed, Submit a "delete filename" command 
  106.    where "filename" is selected from the Arp file requester 
  107.  
  108.     \ral\c\copy &arf2 &arf1 all\r\c
  109.  
  110.    When RightAlt + c are pressed, submit a "copy file1 file2 all" command 
  111.    where file1 and file2 are selected from the Arp file requester.
  112.  
  113.     \ral\l\list &arf2\r\s
  114.  
  115.    When RightAlt + l are pressed, submit a "list filename" string 
  116.    where filename are selected from the Arp file requester.
  117.  
  118.  
  119. 3. The cut and paste utility "Snap" will not insert a ">" to indicate
  120.    a quote (useful when replying to someone's message on a bulletin
  121.    board). If when pasting from Snap you hold down the LeftShift key
  122.    in addition to the LeftAmiga and Right Mouse button, you will get
  123.    ">" at the start of each line.
  124.  
  125. 4. The file reading routines for clockdj.config and clockdj.keys
  126.    have been made faster.
  127.  
  128. 5. The clock may now be started from Workbench with an icon.
  129.  
  130.  
  131. Bugs fixed:
  132. ~~~~~~~~~~~
  133.  
  134. 1. The documentation states that "kpe" is used to represent the 
  135.    Keypad Enter key. This now works as documented.
  136.  
  137. 2. An error in the key definition file could cause a guru on initial
  138.    startup. This is fixed.
  139.  
  140.  
  141. Version 4.08 
  142. ~~~~~~~~~~~~
  143.  
  144.     This version removes an incompatibility with Word Perfect which
  145. could occasionally lock up the machine.
  146.  
  147.  
  148. Version 4.07 
  149. ~~~~~~~~~~~~
  150.  
  151. 1. When flipping screens, the window under the pointer becomes
  152.    active irrespective of the Sun Mouse or Key Activate settings.
  153.  
  154. 2. A  bug in the mouse button routine has been fixed.
  155.  
  156.  
  157. Version 4.06 
  158. ~~~~~~~~~~~~
  159.  
  160.     The clock window can now be popped to the next screen
  161. immediately by holding down the left shift key while clicking the
  162. left mouse button in the clock window.
  163.  
  164.     The key re-mapping routines have been re-written; the delay
  165. parameter used when submitting a string should not now be needed (although
  166. it is still valid to specify it).
  167.  
  168.  
  169.  
  170.  
  171. WTFPATCH3
  172. ~~~~~~~~~
  173.  
  174.      The arc file contains 'WTFPATCH3', an improved version of the 
  175. WindowToFront patch. Include 'WTFPatch3' in your start-up sequence, 
  176. but make sure you remove the old version of the patch (WTFPatch) first.
  177.    
  178.  
  179.     'WTFPatch3' corrects an Intuition bug in WindoToFront and
  180. WindowToBack. To use it, simply put the 'WTFPatch3' program in your
  181. c: directory and include 'WTFPatch3' in your startup sequence.
  182.  
  183.     Previous versions of the clock had timing code designed to get
  184. around the Intuition bug. The patch is more effective and should
  185. eliminate machine lockups caused by WindowToFront. Since the timing
  186. code has been removed from V3.05 and above, you must run 'WTFPatch3' with this 
  187. version of the clock.
  188.  
  189.  
  190.  
  191. Program Description
  192. ~~~~~~~~~~~~~~~~~~~
  193.  
  194.  
  195.  
  196.      This utility combines a clock, mouse accelerator, screen blanker,
  197. window manipulator, function keys and macros. 
  198.  
  199.     The display is a  small  borderless  window  which  shows the
  200. total memory left in the system  (chip  and fast) and the time in
  201. 12 hour format. The  window  pops  to  the front of the workbench
  202. screen once every  minute. 
  203.  
  204.     You can start the program with a 'Run ClockDJ', 'Runback ClockDJ',
  205. or by clicking on a Workbench icon.
  206.  
  207. (Do NOT use  Workbench 1.3 'run >nil:' or the ARP Arun NOIO commands. 
  208. Only the RunBack in the zoo file or a RunBack to the NUL: device
  209. will work correctly in this situation). 
  210.  
  211. Using 'Runback' is useful if you want to close ALL CLI windows. If you start
  212. the clock with 'Runback', the output which is directed to the default CLI
  213. will not be seen. This is not usually a problem since this output is typically
  214. of the '[CLI 3]' variety. 
  215.  
  216.     If you use 'Runback' or the Workbench to start the program, 
  217. command macros (those ending with a '\c') MUST specify output and 
  218. input redirection to nil:. Eg.:             
  219.  
  220.     \lal\b\run <nil: >nil: blitz\r\c
  221.  
  222. If you do not do this the MACHINE WILL GURU.
  223.    
  224. If you want to start the clock with a 'run' so that the output from macros
  225. to the default CLI is preserved, but the startup CLI is to be closed,
  226. do something like this:
  227.  
  228. newcli "con:0/0/580/200/AmigaDOS " from df0:command.file
  229. endcli > nil:
  230.  
  231. "commands.file" is a file located on df0: containing the following:
  232.  
  233. run clockdj
  234.  
  235.  Starting the clock in this way preserves the file handle of the CLI
  236. which launched the clock and passes it to programs started by the macros.
  237.  
  238.  
  239.  
  240. Start-up parameters (CLI start-up only)
  241. ~~~~~~~~~~~~~~~~~~~
  242. "r" specified as the first parameter will reverse the action of the
  243. mouse buttons for the features that require both to be depressed.
  244. The default is "n", for normal operation.
  245.  
  246. The "Newcli" entry in the menu may now be changed by specifying a second
  247. parameter when starting the clock. Eg.:
  248.  
  249.         run clockdj n NewWsh con:0/0/640/150/Myname
  250.  
  251. Note that if the second parameter is specified, the first parameter must
  252. also be specified.
  253.  
  254.  
  255. Snap enhancement
  256. ~~~~~~~~~~~~~~~~
  257.  
  258.    The cut and paste utility "Snap" will not insert a ">" to indicate
  259.    a quote (useful when replying to someone's message on a bulletin
  260.    board). If when pasting from Snap you hold down the LeftShift key
  261.    in addition to the LeftAmiga and Right Mouse button, you will get
  262.    ">" at the start of each line.
  263.  
  264.  
  265.  
  266. Arp File requester
  267. ~~~~~~~~~~~~~~~~~~
  268.  
  269.    The Arp file requester can be called from a macro either alone or 
  270. as a symbolic variable within the command string. For this to
  271. work you must have V 34 of Arp.Library in your libs: directory.
  272.  
  273. To call the requester on its own, include a macro that looks like this:
  274.  
  275.    \lal\`\&arfx\r\s\2
  276.  
  277. where x is either 1 or 2. The numbers change the colour scheme
  278. of the requester,
  279.  
  280.    This will open the requester on the top screen when you press the
  281. Left-alt and ` (top left of the keyboard) together. Obviously you
  282. can make the key combination anything you want. 
  283.  
  284. When you have selected a file from the requester, the next left mouse
  285. button click  will cause the selected file (including disk and dir)
  286. to be entered into the window where you click. The character delay
  287. (2 in the above example) will be observed.
  288.   
  289. There are a couple of ways to modify the string that is generated:
  290.  
  291.     
  292. Holding down Left Shift when you click will insert a right Amiga x
  293. at the start of the characters; this is useful for clearing existing
  294. data out of a string gadget.
  295.  
  296. Holding down CTRL will submit the directory for the first mouse click
  297. and the file for the second. This is useful for filling in strings
  298. where the directory and file are in separate gadgets (in Dpaint, for 
  299. example).
  300.  
  301. Holding down CTRL+Left Shift when you click will submit the directory
  302. and file names separately and precede each with a Right Amiga x.
  303.  
  304.  
  305.  
  306. To include the requester as a variable in a command:
  307.  
  308.    The macro definitions will allow &arf1 and &arf2 to be defined
  309.    as symbolic variables anywhere in the string fields of a macro.
  310.    This will cause the Arp file requester to be called when the
  311.    macro is invoked; the selected file name (and path) will be
  312.    substituted for the variable. Any number of &arf1 (or &arf2)
  313.    variables can be included in the string. The variable can be 
  314.    specified in either command or string macros (command macros
  315.    have a "c" at the end, string macros have an "s" at the end).
  316.  
  317.     For example:
  318.  
  319.     \ral\t\type &arf2\r\c
  320.  
  321.    When RightAlt + t are pressed, submit a "type filename" command 
  322.    where "filename" is selected from the Arp file requester.
  323.     
  324.  
  325.     \ral\d\delete &arf2\r\c
  326.  
  327.    When RightAlt + d are pressed, Submit a "delete filename" command 
  328.    where "filename" is selected from the Arp file requester 
  329.  
  330.     \ral\c\copy &arf2 &arf1 all\r\c
  331.  
  332.    When RightAlt + c are pressed, submit a "copy file1 file2 all" command 
  333.    where file1 and file2 are selected from the Arp file requester.
  334.  
  335.     \ral\l\list &arf2\r\s
  336.  
  337.    When RightAlt + l are pressed, submit a "list filename" string 
  338.    where filename are selected from the Arp file requester.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345. Window manipulation
  346. ~~~~~~~~~~~~~~~~~~~
  347.  
  348. The following can be selected from the menu or by clicking the correct
  349. combination of mouse buttons:
  350.  
  351.  
  352. 1. Screen blanking after a pre-defined period of inactivity.
  353.  
  354. 2. Pointer blanking after a pre-defined period of inactivity.
  355.  
  356. 3. Mouse accelerator.
  357.  
  358. 4. Sun mouse.
  359.  
  360. 5. Click the window to front with the left mouse button.
  361.  
  362. 6. Click the window to back by pressing the left mouse button followed by the
  363.    right mouse button, with the left button still down.
  364.  
  365. 7. Cycling through screens by pressing the right mouse button followed by the
  366.    left mouse button with the right button still down.
  367.  
  368. 8. Left-Amiga-m will shuffle screens if "Screen Cycle" is selected.
  369.  
  370.  
  371. The button sequences for 6. and 7. can be reversed by specifying the
  372. parameter "r" when starting the clock: eg:
  373.  
  374. run clockdj r
  375.  
  376.  
  377. All the above can be selected my menus and saved in the configuration
  378. file.
  379.  
  380.  
  381. Hide Window
  382. ~~~~~~~~~~~
  383. The program will allow the user to select a window and remove it
  384. from the screen while leaving the task that started it unaffected. 
  385.  
  386. To do this, point at the window you want to remove, hold the 
  387. LeftShift+LeftAmiga+Control keys down and press the left mouse button;
  388. the window should disappear. To bring the window back hold
  389. LeftShift+LeftAmiga+Control keys and press the right mouse button.
  390.  
  391. Up to 60 windows can be hidden in this way. When retrieving windows
  392. the last one removed is brought back first. A separate list of hidden windows
  393. is maintained for each screen, so only the windows for the active screen are
  394. retrieved.
  395.  
  396. I put this feature in because my workbench screen is often cluttered
  397. with small windows opened by tasks like VirusX. These windows serve no useful
  398. purpose and I decided I would like a means of removing them.
  399.  
  400. Restrictions: 
  401.  
  402. 1. CLI windows cannot be removed. Doing so confuses things and ends in a guru,
  403.    so the CLI windows are ignored when selecting a window to hide.
  404.  
  405.  
  406. 2. Some programs look at their window size; FileInjector does this. If the
  407.    small FileInjector window is hidden and the hot key sequence is used, the
  408.    resulting window is smaller than it should be. The solution is one of: don't
  409.    hide this type of window; retrieve the window before the hot key; retrieve
  410.    the window after the hot key. The last option would require a window refresh
  411.    too (move the window).
  412.  
  413. 3. You should use this feature with caution. Some programs don't expect
  414.    to have other tasks interfere with their windows and gurus can occur.
  415.    Generally, if the window holds only text then there will not be a problem.
  416.  
  417.  
  418.  
  419. Changing the window size of the clock display
  420. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  421.  
  422. The size of the clock window can be changed by hitting: 
  423. LeftShift+LeftAmiga+CTRL+up arrow or down arrow. This will allow the
  424. characters of larger fonts to be displayed correctly.
  425.  
  426. The size will be saved in the config file when "Save" is selected
  427. from the menu. 
  428.  
  429.  
  430. Moving the clock window to another screen
  431. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  432.  
  433.     The clock window can be popped to the next screen
  434. immediately by holding down the left shift key while clicking the
  435. left mouse button in the clock window.
  436.  
  437.     This feature works whatever is selected in the Pop to Front
  438. menu item.
  439.     
  440.  
  441. Menu options
  442. ~~~~~~~~~~~~
  443.  
  444. NewCLI
  445. ------
  446.  
  447. Gives you a new CLI window at the bottom of the screen.
  448.  
  449.  
  450.  
  451. Chip/Fast
  452. ---------
  453.  
  454. This option gives chip and fast memory displays separately. When selected
  455. the menu toggles to "Total Memory" to enable you to get back to a total
  456. memory display.
  457.  
  458.  
  459.  
  460. Colour
  461. -----
  462.  
  463. Allows you to select the colour of the clock display.
  464.  
  465.  
  466.  
  467. Priority
  468. --------
  469.                      
  470. The default priority of the clock is 2 which seems to work OK in most
  471. circumstances. Setting it to 0 makes it the same priority as other 
  472. tasks  started  from CLI. Making it negative gives it a lower priority
  473. than other CLI tasks. This option gives you a choice of running the clock
  474. from -3 to +4. I found the negative values useful while running a Basic
  475. drawing program: anything above -1 made the drawing process
  476. jerky.
  477.  
  478.  
  479.  
  480. Refresh
  481. -------
  482.  
  483. This is the maximum rate at which the program will update the display.
  484. The default is 5 times per second and the options allow from 10 times
  485. to once per second. I  only  do an PrintIText if something has changed,
  486. so even 10 times per second does  not  use much CPU - you can
  487. use pm to see how much.  
  488.  
  489.  
  490. Blank Screen
  491. ------------
  492.  
  493. The screen will blank after the specified time (in minutes) if there is no
  494. keyboard or mouse activity.
  495.  
  496.  
  497. Blank Pointer
  498. -------------
  499.  
  500. The mouse pointer will blank after the specified time (in seconds) if there is
  501. no mouse activity.
  502.  
  503. When the Snooze Off entry is checkmarked the pointer will not blank if it is 
  504. a snooze pointer. This can avoid having to move the mouse to
  505. see if an operation is complete when the pointer has been blanked.
  506.  
  507.  
  508. Mouse Speed
  509. -----------
  510.  
  511. Accelerates the mouse pointer. 1 is no acceleration.
  512.  
  513.  
  514.  
  515. Click to front
  516. --------------
  517.  
  518. Clicking the left mouse button in a window the specified number of
  519. times will bring it to the front.
  520.  
  521.  
  522. Click to front now gives you the option of keeping or discarding 
  523. the last of the left mouse button clicks which brings the window to front. 
  524.  
  525. There is a 'Discard' sub-menu item under 'Click to Front'. 
  526. If 'Discard' is checked the last mouse click is discarded.
  527.  
  528. The difference this option makes is mainly seen when the last
  529. mouse click is on an icon or other field you wish to select. To find
  530. out which to use, experiment.
  531.  
  532.  
  533. Click to back
  534. -------------
  535.  
  536. Click the window to back by pressing the left mouse button followed by the
  537. right mouse button the specified number of times.
  538.  
  539.  
  540. Note that this sequence can be reversed by specifying "r" as a start-up
  541. parameter
  542.  
  543.  
  544. Sun Mouse
  545. ---------
  546.  
  547. Activates the window the pointer is above without having to click the left
  548. mouse button.
  549.  
  550.  
  551.  
  552. Screen Cycle
  553. ------------
  554.  
  555.  
  556. Cycling through screens by pressing the right mouse button followed by
  557. the left mouse button with the right button still down.
  558.  
  559. Note that this sequence can be reversed by specifying "r" as a
  560. start-up parameter
  561.  
  562. The screen cycle can also be triggered by hitting Left-Amiga-m.
  563.  
  564.  
  565. Key Activate
  566. ------------          
  567.  
  568. If this feature is used, the window under the pointer will be activated
  569. when a key is depressed.
  570.  
  571. Pop to Front
  572. ------------
  573.  
  574. Selecting this item causes the clock to pop to the front of the 
  575. current screen if 'Windows' is selected, or to the top screen if
  576. 'Screens' is selected.
  577.  
  578.    The Pop to Front menu item has a sub-item called "Cling". If
  579.    you select this a message will appear asking you to click in a
  580.    window. When you do, the clock will attach itself to the selected
  581.    window; the clock menu will also become a part of this window. 
  582.    Note that only windows with no existing menus or UserPort
  583.    are eligible to be selected. In practise this confines you to CLI
  584.    windows. Once the clock is attached to a window, the "Cling" menu
  585.    item is highlighted; re-selecting "Cling" will move the clock to
  586.    its own window on the Workbench screen. If you close a window
  587.    the clock is attached to, it will re-open itself on the Workbench
  588.    screen. 
  589.  
  590.     If "Save" is selected when the clock is attached to a window,
  591.    the window title will be saved in the clockdj.config file. When
  592.    the clock is started, it will look for a window with this title and
  593.    attach itself to the window.
  594.  
  595.  
  596. Map Keys
  597. --------
  598.  
  599. When checked, the key mapping and macro functions are active.
  600.  
  601.  
  602. Load Keys
  603. ---------
  604.  
  605. Loads in a new set of key and macro definitions.
  606.  
  607.  
  608. Save
  609. ----
  610.  
  611. If you select "Save", all the current settings, including the window
  612. position, will be written to a file called "clockdj.config" in the 
  613. root directory of sys:. You should be careful to ensure that sys: is
  614. assigned to the correct disk so that the file can be read when the clock
  615. is next started.
  616.  
  617.  
  618. The next time clockdj starts it will attempt to read this file and set
  619. up the clock and associated parameters exactly as they were when you 
  620. selected "Save".
  621.  
  622. You should select this option when you are happy with the way the clock
  623. looks, and then make sure you have the disk with the clockdj program 
  624. on it assigned to sys:. 
  625.  
  626.  
  627.  
  628. Quit
  629. ----
  630.  
  631. Ends the program.
  632.  
  633.  
  634. Macros and redefining the keys
  635. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  636.  
  637. ClockDJ will allow you re-map the keyboard, substitute a string
  638. of characters for a single key depression, or execute a command when
  639. a particular key sequence is pressed. The key definitions and macros
  640. must be created by you and saved in a file; the default file read when
  641. the program starts is sys:clockdj.keys. The key definitions can be changed
  642. by selecting Load Keys from the menu.
  643.  
  644.  
  645.  
  646.    Pressing CTRL-` (the "ctrl" key and the "`" key) is an escape for
  647. the next key/mouse sequence entered. This will prevent translation or
  648. macro generation on  the next key/mouse sequence. 
  649.  
  650.  
  651.  
  652. NB. 'Map Keys' must be selected from the menu to activate the macro
  653.     function.
  654.  
  655.  
  656. The statement format is:
  657.  
  658. \xxx,yyy\z\wwwwww\r\s\5
  659. |    |   |   |    k c |
  660. |    |   |   |    | | |_The delay between each character in 10ms increments.
  661. |    |   |   |    | | 
  662. |    |   |   |    | |_ s = string; c = command
  663. |    |   |   |    |
  664. |    |   |   |    |_ r = replace character with the string or command
  665. |    |   |   |       k = generate string or command, but keep the original
  666. |    |   |   |           character.
  667. |    |   |   |
  668. |    |   |   |_ String to be generated, or command to be executed.
  669. |    |   |   
  670. |    |   |_ Character to be re-mapped. 
  671. |    |
  672. |    |_ List of qualifiers (see below), separated by commas.
  673. |
  674. |
  675. |_ Delimiter.
  676.  
  677.  
  678. NOTE: Any line that begins with an asterisk (*) will be treated as a comment.
  679.  
  680.  
  681. Delimiter
  682. ---------
  683.  
  684. A "\" is the character used to delimit fields. If you wish to include 
  685. one in the string, precede it with a "^".
  686.  
  687. Qualifiers
  688. ----------
  689.  
  690. This defines which keys must be pressed with the re-map character
  691. to generate the string or command. eg., you may want the qualifiers to be
  692. left shift and right alt. If no qualifiers are needed to trigger the re-map, 
  693. the statement would start with a "\\".
  694.  
  695. Multiple qualifiers are specified by separating them by commas: eg.,
  696. "lsh,lat,ctl".
  697.  
  698.  
  699.  
  700. The valid qualifiers are: (all in lower case)
  701.  
  702. lsh    Left shift.
  703. rsh    Right shift.
  704. clo    Caps lock.
  705. ctl    Control (CTRL).
  706. lal    Left alt.
  707. ral    Right alt.
  708. lam    Left Amiga.
  709. ram    Right Amiga.
  710.  
  711.  
  712. The above qualifiers must be specified in lower case.
  713.                      ~~~~
  714.  
  715. Character to be re-mapped.
  716. ------------------------
  717.  
  718. This field is either a single character - "w", for example - or
  719. a string of characters which represents a single character.
  720. If a single character is specified it must be in lower case; if you want
  721. the upper case character re-mapped you must use two statements with
  722. "lsh" and "rsh" qualifiers. This also applies to keys like "{", "!"
  723. etc. whose lower and upper case representations are different.  
  724.  
  725. Valid strings are: (in lower case)
  726.  
  727. f01    The function keys. 
  728. f02            |
  729. f03            |
  730. f04            |
  731. f05            |
  732. f06            |
  733. f07            |
  734. f08            |
  735. f09            |
  736. f10            V
  737.  
  738. hel     Help key.
  739. esc     Escape key.
  740. tab     Tab key.
  741. bsp     Backspace key.
  742. ret     Return key.
  743. del     Delete key.
  744. upa     Up arrow.
  745. lea     Left arrow.
  746. doa     Down arrow.
  747. ria     Right arrow.
  748. kp0     Key pad 0.
  749. kp1     Key pad 1.
  750. kp2     Key pad 2.
  751. kp3     Key pad 3.
  752. kp4     Key pad 4.
  753. kp5     Key pad 5.
  754. kp6     Key pad 6.
  755. kp7     Key pad 7.
  756. kp8     Key pad 8.
  757. kp9     Key pad 9.
  758. kp.     Key pad ..
  759. kp-     Key pad -.
  760. kpe     Key pad enter.
  761. kp)     Key pad ).
  762. kp(     Key pad (.
  763. kp/     Key pad /.
  764. kp+     Key pad +.
  765. arf1    Arp file requester. Colour 1. If specified alone, the selection
  766. arf2    Ditto, Colour 2               will be injected into the window
  767.                       at the next Left Mouse Button click.
  768.                        If specified with other characters, 
  769.                       will act as a symbolic variable; the
  770.                       selection will replace the variable
  771.                        in the command/string.
  772.  
  773. The above keys must be specified in lower case.
  774.                ~~~~
  775.  
  776.  
  777.  
  778. String
  779. ------
  780.  
  781. The string of characters which will replace the character to
  782. be re-mapped. 
  783.  
  784. Special keys (del, bsp, for example) may be inserted into the string.
  785. They are specified by preceding the key name with a "&". For example,
  786. "&del" would be delete, "&ret" would be return, etc. Any key listed above
  787. in the "Character to be re-mapped" section can be specified in this way (still
  788. in lower case).
  789.  
  790. Previous versions of the program allowed a limited set of control characters
  791. in the string by using the "^". This will still work. The characters
  792. which can be defined in this way are:
  793.  
  794.  
  795. ^[   Escape.
  796. ^h   Backspace.
  797. ^i   Tab.
  798. ^m   Return.
  799.  
  800. The "^" and "\" can be included in the string by preceding them
  801. with a "^".
  802.  
  803.  
  804. A character in a macro string may include a qualifier. 
  805. Any of the qualifiers listed above under "Qualifiers" are valid.
  806. The qualifier is preceded by a "%" and multiple qualifiers are
  807. separated by commas. Eg., 
  808.  
  809. "%lal,%ctla" 
  810.  
  811. (in lower case)  would specify LeftAlt+CTRL+a.
  812.  
  813. Multiple qualifiers should be separated by commas. This can be useful
  814. for entering data in a string gadget (a file requester, for example).
  815. The file name you want in the requester may be "myfile"; specifying
  816. "%ramxmyfile" in the string would clear the gadget before filling it
  817. with "myfile".
  818.  
  819.  
  820.  
  821. The string should appear in the active window.
  822.  
  823. Each statement can be up to 1000 characters long.
  824.  
  825.  
  826. Replace/Keep
  827. ------------
  828.  
  829.  
  830. An "r" causes the re-mapped character to be replaced with the
  831. string or command. A "k" will keep the re-mapped character.
  832.  
  833. This must be specified in lower case.
  834.  
  835.  
  836. String/Command
  837. --------------
  838.  
  839. An "s" will submit the string into the input stream: it should
  840. appear in the active window.
  841.  
  842. A "c" will execute the string as a command. A "^m" (CR) or "&ret" at the end
  843. of the command is not needed. The command will be launched from the clock
  844. task AT THE SAME PRIORITY AS THE CLOCK; the default clock priority is 2.
  845. Some programs do not run well at priority 2 -  eg Txed, Excellence, Blitz -
  846. since they use input handlers running at priority 0. To avoid this kind of
  847. problem either run the clock at priority 0 or use the ARP Arun command and
  848. set the priority of the new task to 0.
  849.  
  850.  
  851. This must be specified in lower case.
  852.  
  853.  
  854. Delay
  855. -----
  856.  
  857. ****************
  858. *    NOTE      *
  859. ****************
  860.  
  861. Version 4.06 and above contain improvements which, as far as I know, 
  862. eliminate the need to specify a delay. It is still supported, however.
  863.  
  864.  
  865. The delay value will delay each character by the value*15 milliseconds. Eg.,
  866. a value of 5 specifies 75 ms. 
  867.  
  868. The delay field can be between 0 and 9.
  869.  
  870. If the delay is omitted, a delay of 0 is assumed.
  871.  
  872. Examples
  873. ~~~~~~~~
  874.  
  875.  
  876. \\f01\run  >nil: <nil: ed\r\c
  877.  
  878. Will run ed . Notice that no qualifier was specified
  879. for the function key F1. The redirection to nil: is to prevent unwanted
  880. messages in the console window.
  881.  
  882.  
  883.  
  884.  
  885. \ctl,lsh\f01\dir df0:\r\c
  886.  
  887. When CTRL, left shift and F1 are depressed a dir df0: will execute and the
  888. result will appear in the window belonging to the cli which started ClockDJ.
  889. This would work only if ClockDJ has NOT been started with 'RunBack'.
  890.  
  891.  
  892.  
  893. \lal\t\run >nil: <nil: Terminals:gt/gt\r\c
  894.  
  895. Run GT when left-alt t is depressed.
  896.  
  897.  
  898.  
  899.  
  900. \lal\esc\newcli <nil: >nil:\r\c
  901.  
  902. Start a new cli when Left-alt esc is depressed.
  903.  
  904.  
  905.  
  906.  
  907. \lal\n\David Jenkins\r\s\5
  908.  
  909. Submit the string when left-alt n is depressed and insert a 50 ms delay
  910. between each character.
  911.  
  912.  
  913.  
  914. \lal\m\Inter-Office Correspondence&ret&retFrom:  David Jenkins&ret&retTo:&ret&retSubject:&ret&ret______________________________________________________________________________&ret&ret\r\s\5
  915.  
  916. Submit the string when left-alt m is depressed and insert a 50 ms delay
  917. between each character..
  918.  
  919.  
  920. \clo\`\~\r\s
  921. \clo\1\!\r\s
  922.  
  923.  
  924. Convert Caps lock "`" and "1" to "~" and "!".
  925.  
  926.  
  927. \lal\f\%ramxdf0:file1\r\s
  928.  
  929.  
  930. Is useful for putting a string into a requester. The "%ramx" will submit a
  931. Right Amiga-x which will clear the string gadget before submitting the
  932. "file1" string.
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.                               AREXX Macros
  942.                               ~~~~~~~~~~~~
  943.  
  944.     ClockDJ versions 4.00 and above contain an ARexx port.  The clock
  945. is  an  ARexx  host  and will accept commands from an ARexx program; the
  946. commands  are  listed below.  If a result is expected it will be returned
  947. in  the  special  ARexx  variable  'result';  any commands which return a
  948. result should have a 'options results' statement in the program.
  949.  
  950.  
  951. Title of ClockDJ
  952. ----------------
  953.  
  954.     The clock window has a title of 'ClockDJ' (case sensitive);
  955. you can use this title in some of the ARexx macros. For an example of this
  956. take a look at Move.Rexx and Move2.Rexx.
  957.  
  958.  
  959. Host Name
  960. ---------
  961.  
  962.     The host name of ClockDJ is CLOCKDJ (in capitals).
  963.  
  964.  
  965. Errors
  966. ------
  967.  
  968.     Errors are reported by setting a return code (the RC variable).
  969.  
  970. A return code of 20 is set for an unrecognized command.
  971.  
  972. A  return  code  of 10 is set for an invalid parameter (an invalid window
  973. address, for example).
  974.  
  975.  
  976. Commands
  977. --------
  978.  
  979. NOTE:  when executing commands which manipulate windows (like MOVE), be
  980. careful  not  to submit too many requests for the same window without a
  981. pause  between  the  requests.   Intuition  gets upset if it receives a
  982. request  for  a window before it has acted on the previous request; the
  983. ARexx   function  'delay'  (in  rexxsupport.library)  can  be  used  to
  984. accomplish this:  eg., 'call delay 5'.
  985.  
  986.  
  987.  
  988.  
  989.     ACTIVATEWINDOW    address        
  990.  
  991.  
  992. Activate the window with this address. The window may be on any screen.
  993.  
  994.  
  995.                            *******************
  996.  
  997.      COLOUR    nn    
  998.  
  999.  
  1000. Change the colour of the clock display to nn (0-11).  Note: nn
  1001. corresponds to a colour item menu selection
  1002.  
  1003.  
  1004.                            *******************
  1005.  
  1006.  
  1007.      CHIP         
  1008.  
  1009. Change the clock to display chip/fast memory.
  1010.  
  1011.  
  1012.                            *******************
  1013.  
  1014.  
  1015.      DELAY    value        
  1016.  
  1017.  
  1018. Specify an inter-character  delay value in microseconds for injected data.
  1019. The delay value remains in effect for all injected data; if you want to
  1020. reset it to zero, submit a 'delay 0' command.
  1021.  
  1022.                            *******************
  1023.  
  1024.  
  1025.      FILEREQUESTER
  1026.  
  1027.  
  1028. Call the Arp file requester.  The full pathname of the selected file will
  1029. be  returned  in  'result'.   If  'cancel'  is  selected  on the Arp file
  1030. requester, a null string will be returned in 'result'.
  1031.  
  1032.  
  1033.                            *******************
  1034.  
  1035.  
  1036.     SETARPDIR dirname 
  1037.    
  1038. will set the initial directory string in the  Arp file requester
  1039. to dirname.
  1040.  
  1041.  
  1042.                            *******************
  1043.  
  1044.  
  1045.     SETARPFILE filename 
  1046.    
  1047. will set the initial file string in the  Arp file requester
  1048. to filename.
  1049.  
  1050.  
  1051.  
  1052.                            *******************
  1053.  
  1054.  
  1055.    SETARPTITLE title 
  1056.    
  1057. will set the title in the  Arp file requester.
  1058.  
  1059.  
  1060.                            *******************
  1061.  
  1062.  
  1063.    SETARPCOLOUR number 
  1064.    
  1065.   will set the colour of the  Arp file requester. The number can
  1066.   be 1 or 2.
  1067.  
  1068.  
  1069.                            *******************
  1070.  
  1071.    POPREQUESTER text
  1072.  
  1073.   will put a requester displaying the text on the top screen with 
  1074.   a YES/NO choice. The selection is passed back in RESULT as YES or NO.
  1075.  
  1076.  
  1077.                            *******************
  1078.  
  1079.  
  1080.      GETACTIVEWINDOW      
  1081.  
  1082.  
  1083. Gets the active window address and returns it in 'result'.
  1084.  
  1085.  
  1086.                            *******************
  1087.  
  1088.  
  1089.     GETNEXTWINDOW    address        
  1090.  
  1091.  
  1092. Get  the  address  of  the  next window on a screen.  The parameter is an
  1093. address of a window.
  1094.  
  1095.                            *******************
  1096.  
  1097.  
  1098.  
  1099.      GETPOINTERWINDOW          
  1100.  
  1101.  
  1102. Get the address of the window under the pointer. The address is returned
  1103. in 'result'.
  1104.  
  1105.  
  1106.                            *******************
  1107.  
  1108.  
  1109.     GETSCREEN    title
  1110.  
  1111.  
  1112.  
  1113. Get  the  screen  address  from  the  title.  Note that the title is case
  1114. sensitive.  The address is returned in 'result'.
  1115.  
  1116.  
  1117.                            *******************
  1118.  
  1119.     
  1120.     GETTITLEOFSCREEN address    
  1121.  
  1122.  
  1123. Get a screen title from a screen address. The title is returned in
  1124. 'result'.  
  1125.  
  1126.  
  1127.                            *******************
  1128.  
  1129.  
  1130.      GETTOPSCREEN
  1131.  
  1132.  
  1133. Get the address of the top screen. The address is returned in 'result'.
  1134.  
  1135.  
  1136.                            *******************
  1137.  
  1138.  
  1139.      GETWINDOW    title
  1140.  
  1141.  
  1142. Get  the  address of the window with this title.  The address is returned
  1143. in  'result'.  Note that 'title' is case sensitive; make sure you specify
  1144. the exact title.  The window can be on any screen.
  1145.  
  1146.  
  1147.                            *******************
  1148.  
  1149.  
  1150.  
  1151.      HIDEWINDOW    address        
  1152.  
  1153.  
  1154. Hide the window with the specified address.
  1155.  
  1156.  
  1157.                            *******************
  1158.  
  1159.  
  1160.      INJECT    CLICK    data    
  1161.  
  1162.  
  1163. Injects  data  into  the window where you click the left mouse button.  A
  1164. small  window will appear on the top screen asking you to click where you
  1165. want  the  data  injected.   The  data to be injected is specified by the
  1166. second  operand.  If you precede the data by a hex '01' ('01'x in ARexx),
  1167. a Right Amiga+x will be inserted to clear a string requester).
  1168.  
  1169.  
  1170.                            *******************
  1171.  
  1172.  
  1173.      INJECT    ACTIVE    data
  1174.  
  1175.  
  1176. Injects data into the active window. The data to be injected is specified
  1177. by the second operand.
  1178.  
  1179.  
  1180.                            *******************
  1181.  
  1182.  
  1183.      INJECT    address    data
  1184.  
  1185.  
  1186. Injects  data into the window with the the address specified in the first
  1187. operand.  The data is specified by the second operand.
  1188.  
  1189.  
  1190.                            *******************
  1191.  
  1192.  
  1193.      LOADKEYS filename
  1194.  
  1195.  
  1196. Load new key definitions from the specified file name.
  1197.  
  1198.  
  1199.                            *******************
  1200.  
  1201.  
  1202.     MOVEWINDOW    address x-position y-position    
  1203.  
  1204.  
  1205. Move  a  window  to  a  new  position.   The  first parameter is a window
  1206. address,  the  second  is the X position and the third is the Y position.
  1207. If you attempt to move a window outside a screen's limits a return code of
  1208. 10 will be set.
  1209.  
  1210.  
  1211.                            *******************
  1212.  
  1213.  
  1214.     POPUP        OFF        
  1215.             WINDOWS
  1216.             SCREENS
  1217.  
  1218.  
  1219. Set the popup status of the clock.
  1220.  
  1221.  
  1222.                            *******************
  1223.  
  1224.  
  1225.     QUALIFIER  'nnnn'x  
  1226.  
  1227.  
  1228. Set  a key qualifier for injected data.  The qualifier is 2 hex bytes and
  1229. the values are explained below. This feature is useful if you want to
  1230. inject,  for  example,  a  Right Amiga+Right Shift+Return.  The qualifier
  1231. remains  set  for  all injected data, so you must reset it.  A normal key
  1232. depression has a qualifier of '8000'x (relative mouse).
  1233.  
  1234. NOTE:   this  is  only  effective for data injected with INJECT ACTIVE or
  1235. INJECT address.  It will not work with INJECT CLICK.
  1236.  
  1237.  
  1238.  
  1239. Qualifiers
  1240. ----------
  1241.  
  1242. IEQUALIFIER_LSHIFT    EQU   $0001        Left shift
  1243. IEQUALIFIER_RSHIFT    EQU   $0002        Right Shift
  1244. IEQUALIFIER_CAPSLOCK    EQU   $0004        Caps Lock
  1245. IEQUALIFIER_CONTROL    EQU   $0008        CTRL
  1246. IEQUALIFIER_LALT    EQU   $0010        Left Alt
  1247. IEQUALIFIER_RALT    EQU   $0020        Right Alt
  1248. IEQUALIFIER_LCOMMAND    EQU   $0040        Left Amiga
  1249. IEQUALIFIER_RCOMMAND    EQU   $0080        Right Amiga
  1250. IEQUALIFIER_RELATIVEMOUSE     EQU   $8000   Reset to this value.
  1251.  
  1252.  
  1253. NB. OR the bits together to set a qualifier: eg: '8022'x is Right shift+
  1254.     Right alt+Relative mouse.  You should always include the relative mouse 
  1255.     bit.
  1256.  
  1257.  
  1258.                            *******************
  1259.  
  1260.  
  1261.      RETRIEVEWINDOW     address    
  1262.  
  1263.  
  1264. Retrieve the hidden window with this address.
  1265.  
  1266.  
  1267.                            *******************
  1268.  
  1269.  
  1270.      SCREENFLIP
  1271.  
  1272.  
  1273. Push the top screen to the bottom.
  1274.  
  1275.  
  1276.                            *******************
  1277.  
  1278.  
  1279.     SCREENFORWINDOW    address    
  1280.  
  1281.  
  1282.  
  1283. Get  the address of the screen which contains this window.  The parameter
  1284. is a window address. The address is returned in 'result'.
  1285.  
  1286.  
  1287.                            *******************
  1288.  
  1289.  
  1290.     SCREENTOFRONT    address        
  1291.  
  1292.  
  1293.  
  1294. Bring the screen with this address to the front.
  1295.  
  1296.  
  1297.                            *******************
  1298.  
  1299.  
  1300.      TOTAL             
  1301.  
  1302. Change the clock to display total memory.
  1303.  
  1304.  
  1305.                            *******************
  1306.  
  1307.  
  1308.  
  1309.     WINDOWTOBACK    address        
  1310.  
  1311.  
  1312.  
  1313. Push the window with this address to the back.
  1314.  
  1315.  
  1316.                            *******************
  1317.  
  1318.  
  1319.     WINDOWTOFRONT    address
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Bring the window with this address to the front.
  1325.  
  1326.  
  1327.  
  1328.  
  1329.                         David Jenkins.
  1330.